# import xlrd
# import  openpyxl
# def read_add_data(sheet_name,min_row,max_row,min_col,max_col):
#
#     workbook = openpyxl.load_workbook(filename=r'D:\FlowerRecognition\auto_1\auto.xlsx')
#     worksheet = workbook[sheet_name]
#     data = []
#     for row in worksheet.iter_rows(min_row=min_row, max_row=max_row, min_col=min_col, max_col=max_col, values_only=True):
#         data.append(list(row))
#     return data
#
# def logindata1():
#     data = read_add_data("登录", 2, 10, 1, 3)
#
#     return data
#
#
# def logindata2():
#     wb = xlrd.open_workbook(filename=r"D:\FlowerRecognition\auto_1\auto.xls")
#     sheet2 = wb.sheet_by_index(1)
#     data2 = []
#     for i in range(1, sheet2.nrows):
#         data2.append(sheet2.row_values(i))
#     return data2
#
# def logindata3():
#     data=[
#         [" ", "123456", "123456", "0"],
#         ["abcabcabcabcabcabca", "123456", "123456"],
#         ["abcabcabcabcabcabcab", "123456", "123456"],
#         ["abcabcabcabcabcabcabc", "123456", "123456"],
#         ["#$^&*^$F$S", "123456", "123456"]
#     ]
#     return data



import openpyxl

def read_add_data(sheet_name,min_row,max_row,min_col,max_col):

    workbook = openpyxl.load_workbook(filename=r'D:\FlowerRecognition\auto_1\auto.xlsx')
    worksheet = workbook[sheet_name]
    data = []
    for row in worksheet.iter_rows(min_row=min_row, max_row=max_row, min_col=min_col, max_col=max_col, values_only=True):
        data.append(list(row))
    return data

def login_data():
    data=read_add_data("登录",1,10,1,3)
    return data

def register_data1():
    data=read_add_data("注册",2,5,1,4)
    return data



def register_data2():
    data=read_add_data("注册",2,10,1,4)
    return data


def accountsecurity_data1():
    data=read_add_data("账户安全",2,3,1,6)
    return data
def accountsecurity_data2():
    data=read_add_data("账户安全",4,8,1,6)
    return data

def creditmanage_data1():
    data=read_add_data("银行卡管理",2,5,1,5)
    return data

def fund_data1():
    data=read_add_data("基金",2,5,1,4)
    return data



def apply_data1():
    data = read_add_data("网贷", 2, 3, 1, 5)
    return data
# # a=login_data()
# # print(a)
# # print(type(a[0][0]))
# # print(type(a[0][1]))
# # print(type(a[0][2]))
# def login_dara_username_error():
#
#     # data = [
#     #     ["lisi3", "123456","用户名不存在"],
#     #     ["admin1", "1234567","用户名不存在"],
#     #     ["", "","用户名为空"]
#     #
#     # ]
#     data = read_add_data("登录", 6, 8, 1, 3)
#
#     return data
#
# def login_data_password_error():
#     # data = [
#     #     ["lisi", "1234567","密码错误"],
#     #     ["admin", "1234567","密码错误"],
#     #     ["lisi", "e10adc3949ba59abbe56e057f20f883e","密码错误"],
#     #     ["lisi", "E10ADC3949BA59ABBE56E057F20F883E","密码错误"],
#     #
#     # ]
#     data = read_add_data("登录", 10, 13, 1, 3)
#     return data
#
# def SignUp_data():
#     data = [
#         ["wangwu", "123456","123456",1],
#         ["wangwu", "123456","1234567",0],
#
#
#
#     ]
#     return data
# def SignUp_data_username_exist():
#     data = [
#         ["wangwu1", "123456", "123456", 1]
#     ]
#     return data
# def SignUp_data_username_error():
#     data = [
#         ["wangwu", "123456","123456",1],
#     ]
#     return data
# def SignUp_data_password_error():
#     data = [
#         ["wangwu", "123456","1234567",1],
#         ["wangwu", "123456","1234567",1],
#     ]
#     return data
# def SignUp_data_dara_repassword_error():
#     data = [
#         ["wangwu", "123456","123456",1],
#     ]
#     return data